package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.PrBankinfoDTO;
import com.financing.wap.dao.IPrBankinfoDao;
import com.financing.wap.common.SqlName;
/**
 * pr_bankinfo  
 * 银行信息 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("prBankinfoDao")
public class PrBankinfoDaoImpl extends BaseDaoImpl<PrBankinfoDTO, Integer> implements IPrBankinfoDao {


	@Override
	public int insert(PrBankinfoDTO prBankinfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.PrBankinfoSql.insert, prBankinfo);
	}

	@Override
	public void update(PrBankinfoDTO prBankinfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.PrBankinfoSql.update, prBankinfo);
	}

	@Override
	public void updateForce(PrBankinfoDTO prBankinfo) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.PrBankinfoSql.updateForce, prBankinfo);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.PrBankinfoSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<PrBankinfoDTO> queryList(PrBankinfoDTO prBankinfo) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.PrBankinfoSql.queryList, prBankinfo);
	}

	@Override
	public int queryListCount(PrBankinfoDTO prBankinfo) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.PrBankinfoSql.queryListCount, prBankinfo);
	}

	@Override
	public PrBankinfoDTO loadById(Integer id) throws SQLException {
		return  (PrBankinfoDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.PrBankinfoSql.loadById,id);
	}

	@Override
	public Class<PrBankinfoDTO> getEntityClass() {
		return PrBankinfoDTO.class;
	}
 	
}
